package com.example.newdemo.utils;

import android.util.Log;

public class LogUtils {

    private static final String TAG = "LogTag";
    private static boolean isDebug = true;

    public static void showLog(String content) {
        if (isDebug) Log.d(TAG, content);
    }


    public static void d(String message) {
        if (isDebug) {
            Log.d(TAG, message);
        }
    }

    public static void i(String message) {
        if (isDebug) {
            Log.i(TAG, message);
        }
    }

    public static void e(String message) {
        if (isDebug) {
            Log.e(TAG, message);
        }
    }

    public static void display(String... params) {
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < params.length; ++i) {

            stringBuilder.append(params[i]+ "    ");
        }
        Log.i(TAG,stringBuilder.toString());
    }

    public static void display(Object... params) {
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < params.length; ++i) {
            stringBuilder.append(params[i].toString() + "    ");
        }
        Log.i(TAG, stringBuilder.toString());
    }


}
